/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.project.service.dynamic;

import java.util.List;

import com.jeeplus.modules.project.entity.ProjectInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.project.entity.dynamic.ProjectDynamic;
import com.jeeplus.modules.project.mapper.dynamic.ProjectDynamicMapper;

/**
 * 项目动态Service
 * @author 卢经纬
 * @version 2019-04-10
 */
@Service
@Transactional(readOnly = true)
public class ProjectDynamicService extends CrudService<ProjectDynamicMapper, ProjectDynamic> {

	public ProjectDynamic get(String id) {
		return super.get(id);
	}
	
	public List<ProjectDynamic> findList(ProjectDynamic projectDynamic) {
		return super.findList(projectDynamic);
	}
	
	public Page<ProjectDynamic> findPage(Page<ProjectDynamic> page, ProjectDynamic projectDynamic) {
		return super.findPage(page, projectDynamic);
	}
	
	@Transactional(readOnly = false)
	public void save(ProjectDynamic projectDynamic) {
		super.save(projectDynamic);
	}
	
	@Transactional(readOnly = false)
	public void delete(ProjectDynamic projectDynamic) {
		super.delete(projectDynamic);
	}


	public Page<ProjectInfo> findPageByprojectInfo(Page<ProjectInfo> page, ProjectInfo projectInfo) {
		projectInfo.setPage(page);
		page.setList(mapper.findListByprojectInfo(projectInfo));
		return page;
	}

	public List<ProjectDynamic> findListByProject(ProjectInfo projectInfo) {
		return mapper.findListByProject(projectInfo);
	}
}